package com.railway.dao.rowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.railway.bean.Suggestions;

public class SuggestionsRowMapper  implements RowMapper<Suggestions>{

	@Override
	public Suggestions mapRow(ResultSet res, int arg1) throws SQLException {
		Suggestions s = new Suggestions();
		
		s.setSuggestionId(res.getInt("suggestion_id"));
		s.setUserName(res.getString("user_name"));
		s.setUserIdType(res.getString("user_id_type"));
		s.setUserIdNum(res.getString("user_id_num"));
		s.setUserPhone(res.getString("user_phone"));
		s.setSuggestionObject(res.getString("suggestion_object"));
		s.setSuggestionText(res.getString("suggestion_text"));
		s.setIsdelete(res.getInt("isdelete"));
		s.setSuggestionTime(res.getDate("suggestion_time"));
		return s;
	}

}
